home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW Related / DTS MPW Goodies / UnmountProjector < prev    next >
Encoding:
Text File  |  1990-09-14  |  789 b   |  39 lines  |  [TEXT/MPS ]

  1. #
  2. # UnmountProjector        Andrew Shebanow                1/30/89
  3. #
  4. # Modification History:
  5. #
  6. #
  7. # Script to unmount a project
  8. #
  9. #
  10.  
  11. # save exit status, since we are executing at global scope
  12. Set OldExit {Exit}
  13. Set Exit 0
  14.  
  15. # Get list of mounted projects
  16. Set ProjectNameList "`MountProject -pp -s -r | Sort -l`"
  17.  
  18. # Set up project specific items
  19. Set ProjName NIL
  20.  
  21. # Make sure we have at least one project mounted
  22. If "{ProjectNameList}" == ""
  23.     Alert "Cannot set project: no projects are mounted."
  24.     # restore previous state of {Exit}
  25.     Set Exit {OldExit}
  26.     Exit 0
  27. End
  28.  
  29. Set ProjName `GetListItem -r 16 -s -d {ProjectNameList} -m "Choose a project"` > Dev:Null ≥ Dev:Null
  30. if "{ProjName}" != NIL
  31.     UnmountProject "{ProjName}"
  32. End
  33.  
  34. # Update our menu
  35. ProjListMenu
  36.     
  37. # restore previous state of {Exit}
  38. Set Exit {OldExit}
  39.